#!/usr/bin/env python3 import requests import urllib3 urllib3.disable_warnings() requests.packages.urllib3.disable_warnings() URL="http://challs.dvc.tf:2020" TITLE="*** get code @Fey ***\n" def get_codes(): f = open("codes.txt").read().split("\n") return f def send_codes(codes): payload = {"code":codes} rep = requests.post(url=URL,data=payload) return rep if __name__ == "__main__": c_list = get_codes() CODES = "".join(c_list) resp = send_codes(CODES) print (resp.text)